package cn.zch.soft.util.hutool.http;
import cn.hutool.core.lang.Console;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
public class htmlrequest {
  public static void main(String[] args) {
    test1();
  }
  public static void test1() {
    //http://www.gsxt.gov.cn/%7BEl3eOGeqHydCm4BdbuzES0c5Wi6vlLMSa6iCH147U5blj8Hel1Yw4RWtKir8IBrKaivtFKw22lT9TCe9_8rjVGUXTY1Q9tMWLqCgWkzcLNpt--1KwbXTqEzZPpSZ6v1hPEnu7PSEf6Zu8xpE7IoomPEU2NrzsAlWz7yIzh2JfEM-1520321214344%7D
    // http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=郑州
    String result = HttpUtil.get("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=郑州");
    System.out.println(result);
    //    HttpResponse res = HttpRequest.get("http://s.tunnel.qydev.com/webService/UserInfoService.asmx").header("Host", "www.singbon.com").form("a", "b").execute();
    //    String body = res.body();
    Console.log("测试");
    //    Console.log(body);
  }
  public static void test0() {
    //http://www.gsxt.gov.cn/%7BEl3eOGeqHydCm4BdbuzES0c5Wi6vlLMSa6iCH147U5blj8Hel1Yw4RWtKir8IBrKaivtFKw22lT9TCe9_8rjVGUXTY1Q9tMWLqCgWkzcLNpt--1KwbXTqEzZPpSZ6v1hPEnu7PSEf6Zu8xpE7IoomPEU2NrzsAlWz7yIzh2JfEM-1520321214344%7D
    // http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=郑州
    String result = HttpUtil.get("http://s.tunnel.qydev.com/webService/UserInfoService.asmx?op=GetUserInfoByGuyidAName");
    System.out.println(result);
    HttpResponse res = HttpRequest.get("http://s.tunnel.qydev.com/webService/UserInfoService.asmx").header("Host", "www.singbon.com").form("a", "b").execute();
    String body = res.body();
    Console.log("测试");
    Console.log(body);
  }
}
